/**
 * 文档类
 * 
 * @author luo
 * @email luo4521@online.net.tw
 */
package com.addcn.texas
{
	import flash.display.*;
	import flash.events.Event;
	
	import com.addcn.fog.control.Controller;
	import com.addcn.texas.control.StartupCommand;
	
	public class Main extends Sprite
	{
		public static const APP_STARTUP :String = "appStartup";
		public static var base_container : Sprite;
		public static var loading_container : Sprite;
		public static var popup_container : Sprite;		
		
		public function Main() :void {
			this.addEventListener(Event.ADDED_TO_STAGE, addToSatgeHandler);							
		}
		
		private function addToSatgeHandler(evt : Event) : void {
			this.stage.align = StageAlign.TOP_LEFT;
			this.stage.scaleMode = StageScaleMode.NO_SCALE;
			initialize();
		}
		private function initialize() : void {
			Main.popup_container = new Sprite;
			Main.loading_container = new Sprite;
			Main.base_container = new Sprite;	
			this.addChild(base_container);			
			this.addChild(popup_container);
			this.addChild(loading_container);
			
			var _controller : Object = Controller.getInstance();
			_controller.addCommand(StartupCommand);
			_controller.executeCommand(StartupCommand, Main.base_container);
		}
		
		private function addContainer() : void {
			
		}
	
		
	}

}
